    <div class="headingBox">
        <div class="FloatLeft"><img alt="" src="<?php echo imageUrl(); ?>red_leftRound.jpg" height="24" width="5"></div>
        <div style="width:992px;" class="red_midRound"><?php echo $page_heading; ?></div>
        <div class="FloatLeft"><img alt="" src="<?php echo imageUrl(); ?>red_rightRound.jpg" height="24" width="5"></div>
    </div>
        <div>
        <div id="error_msg_div" style="display:none"></div>
        <?php 
			$id = (isset($id)) ? intval($id) : 0;
		?>
        <form method="post" action="<?php echo base_url().$this->uri->segment(1); ?>/save<?php echo ( $id > 0) ? "/$id" : ''; ?>" >
            <input name="sbmt" id="sbmt" value="1" type="hidden">
            <table class="subContentTable" cellpadding="2" cellspacing="5" width="100%">
                <tbody>
                <tr>
                    <td width="20%"><strong>TFN:</strong></td>
                    <td width="35%">
                        <input name="tfn" id="tfn" value="<?php echo set_value('tfn', isset($tfn) ? $tfn : '' ); ?>" size="30" type="text">
                        <?php echo form_error('tfn', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    <td width="20%"><strong>Skills:</strong></td>
                    <td width="35%">
                         <?php  
							$skills_arr = getAllskills(); 
							$skill_id = set_value('skill_id', isset($skill_id) ? $skill_id : '' );
							echo create_select("skill_id", $skills_arr, $skill_id, array('value'=>'id', 'label'=>'name') );
							echo form_error('skill_id', '<div class="errorMsg_1" style="">', '</div>');
						 ?>
                    </td>
                </tr>
                <tr>
                    <td width="20%"><strong>Route Extension<span class="required">*</span>:</strong></td>
                    <td width="35%">
                        <input name="asterisk_ext" value="<?php echo set_value('asterisk_ext', isset($asterisk_ext) ? $asterisk_ext : '' ); ?>" size="30" type="text">
                        <?php echo form_error('asterisk_ext', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    <td width="20%"><strong>Route Priority<span class="required">*</span>:</strong></td>
                    <td width="35%">
                       <input name="asterisk_priority" value="<?php echo set_value('asterisk_priority', isset($asterisk_priority) ? $asterisk_priority : '' ); ?>" size="30" type="text">
                        <?php echo form_error('asterisk_priority', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                </tr>
                
               <?php /*<tr>
                    <td width="20%"><strong>Off Hours<span class="required">*</span>:</strong></td>
                    <td width="35%">
                    	<input name="off_hours" class="class_timepicker" value="<?php echo set_value('off_hours', isset($off_hours) ? $off_hours : '' ); ?>" size="30" type="text">
                        <br><label class="lb_hint"> format:(hh:mm-hh:mm) i.e. 23:00-05:30 </label>
                        <?php echo form_error('off_hours', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    
                    <td width="20%"><strong>Weekend Off Hours:</strong></td>
                    <td width="35%">
                         <input name="weekend_off_hours"  class="class_timepicker" value="<?php echo set_value('weekend_off_hours', isset($weekend_off_hours) ? $weekend_off_hours : '' ); ?>" size="30" type="text">
                         <br><label class="lb_hint"> format:(hh:mm-hh:mm) i.e. 23:00-05:30 </label>
                        <?php echo form_error('weekend_off_hours', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                   
                    
                </tr>
                
                 <tr>
                     <td width="20%"><strong>Business Off Hour File Name<span class="required">*</span>:</strong></td>
                    <td width="35%"> 
                    	<input name="business_hours_playback" value="<?php echo set_value('business_hours_playback', isset($business_hours_playback) ? $business_hours_playback : '' ); ?>" size="30" type="text">
                        <br><label class="lb_hint"> File name without extension </label>
						<?php echo form_error('business_hours_playback', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    
                     
                    <td width="20%"><strong>Off Hour File Name<span class="required">*</span>:</strong></td>
                    <td width="35%"> 
                    	<input name="off_hours_playback" value="<?php echo set_value('off_hours_playback', isset($off_hours_playback) ? $off_hours_playback : '' ); ?>" size="30" type="text">
                        <br><label class="lb_hint"> File name without extension </label>
						<?php echo form_error('off_hours_playback', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    
                 </tr>
                 
                 <tr>
                     <td width="20%"><strong>Voice Mail Box<span class="required">*</span>:</strong></td>
                    <td width="35%"> 
                    	<input name="vmbox" value="<?php echo set_value('vmbox', isset($vmbox) ? $vmbox : '' ); ?>" size="30" type="text">
                        <?php echo form_error('vmbox', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                    <td width="20%"><strong>Customer Service<span class="required">*</span>:</strong> </td>
                    <td width="35%">
                    	<input name="customer_service" value="<?php echo set_value('customer_service', isset($customer_service) ? $customer_service : '' ); ?>" size="30" type="text">
                        <?php echo form_error('customer_service', '<div class="errorMsg_1" style="">', '</div>'); ?>
                   </td>
                 </tr> */ ?>
                 
                 <tr>
                  <td width="20%"><strong>Active<span class="required">*</span>:</strong></td>
                    <td width="35%"> 
                    	 <?php
					   $active = set_value('active', isset($active) ? $active : '' );
                       $active_array['Y'] = 'Active';
                       $active_array['N'] = 'In-active';
	                   echo create_select("active", $active_array, $active );
					   echo form_error('active', '<div class="errorMsg_1" style="">', '</div>'); ?>
                    </td>
                 <td width="20%">  </td>
                    <td width="35%">
                        
                    </td>
                    
                   
                 </tr>
                 <tr bgcolor="#fff1d5">
                    <td colspan="4" align="left">
                        <input value="" class="backBtn" onclick="location.href='<?php echo base_url().$this->uri->segment(1); ?>';" type="button">
                        <input value="" class="submitBtn" type="submit">
                    </td>
                </tr>
                 
             </tbody>
              </table>
        </form> 
    </div>
 
  
  <script>

	jQuery(function($){
	   //$("#tfn").mask("99:99-99:99");
	});
	
	function validate() 
	{
		var error_msg = '';
 		range = $("#tfn").val();
		regex = /^([01]?[0-9]|2[0-3])\:[0-5][0-9]-([01]?[0-9]|2[0-3])\:[0-5][0-9]$/
		if ( ! range.match(regex) ){
			error_msg += '<div class="errorMsg_1" align="center">Please enter correct Off Hours</div>';		
		}
		
		if( error_msg == '' ) {
			$("#error_msg_div").html('');
			$("#error_msg_div").hide();	
			return true;
		} else {
			$("#error_msg_div").html(error_msg);
			$("#error_msg_div").show();	
			return false;
		}
		return false;	
	}						
							
</script>  